package com.booksystem.campuslibrarymanagementsystem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.booksystem.campuslibrarymanagementsystem.entity.BorrowingRulesTable;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface BorrowingRulesTableMapper extends BaseMapper<BorrowingRulesTable> {
    //通过规则id修改最大可借数量，借阅期限和借阅次数
    @Update("update borrowingrules_table set maxborrowedbooks = #{maxborrowedbooks},borrowduration = #{borrowduration},renewallimit = #{renewallimit},updatetime = #{updatetime} where ruleid= #{ruleid}")
    boolean upDataRules(int ruleid,int maxborrowedbooks,int borrowduration,int renewallimit,String updatetime);

}
